package xyz.jcat.spring.security.example.controller;

import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import xyz.jcat.common.web.Resp;

@RestController
public class PermissionController {

    @GetMapping("/user")
    public Resp getUser() {
        return Resp.ok("查询用户");
    }

    @PostMapping("/user")
    public Resp addUser() {
        return Resp.ok("添加用户");
    }

    @DeleteMapping("/user")
    public Resp delUser() {
        return Resp.ok("删除用户");
    }

    @GetMapping("/role")
    public Resp getRole() {
        return Resp.ok("查询角色");
    }

    @PostMapping("/role")
    public Resp addRole() {
        return Resp.ok("添加角色");
    }

    @DeleteMapping("/role")
    public Resp delRole() {
        return Resp.ok("删除角色");
    }
}
